Public Class BlockLog
    Private mlID As Long
    Private mlDatabaseID As Long
    Private mlSessionID As Long
    Private msCreateDate As String = Now

    Private mlBlocked_SPID As Long
    Private msBlocked_Status As String
    Private msBlocked_HostName As String
    Private msBlocked_Program_Name As String
    Private msBlocked_Command As String
    Private msBlocked_LoginName As String

    Private mlBlocking_SPID As Long
    Private msBlocking_Status As String
    Private msBlocking_HostName As String
    Private msBlocking_Program_Name As String
    Private msBlocking_Command As String
    Private msBlocking_LoginName As String

#Region "Properties"
    Public Property ID() As Long
        Get
            Return mlID
        End Get
        Set(ByVal value As Long)
            mlID = value
        End Set
    End Property

    Public Property DatabaseID() As Long
        Get
            Return mlDatabaseID
        End Get
        Set(ByVal value As Long)
            mlDatabaseID = value
        End Set
    End Property

    Public Property SessionID() As Long
        Get
            Return mlSessionID
        End Get
        Set(ByVal value As Long)
            mlSessionID = value
        End Set
    End Property

    Public Property CreateDate() As String
        Get
            Return msCreateDate
        End Get
        Set(ByVal value As String)
            msCreateDate = value
        End Set
    End Property

    Public Property Blocked_SPID() As Long
        Get
            Return mlBlocked_SPID
        End Get
        Set(ByVal value As Long)
            mlBlocked_SPID = value
        End Set
    End Property

    Public Property Blocked_Status() As String
        Get
            Return msBlocked_Status
        End Get
        Set(ByVal value As String)
            msBlocked_Status = value
        End Set
    End Property

    Public Property Blocked_HostName() As String
        Get
            Return msBlocked_HostName
        End Get
        Set(ByVal value As String)
            msBlocked_HostName = value
        End Set
    End Property

    Public Property Blocked_Program_Name() As String
        Get
            Return msBlocked_Program_Name
        End Get
        Set(ByVal value As String)
            msBlocked_Program_Name = value
        End Set
    End Property

    Public Property Blocked_Command() As String
        Get
            Return msBlocked_Command
        End Get
        Set(ByVal value As String)
            msBlocked_Command = value
        End Set
    End Property

    Public Property Blocked_LoginName() As String
        Get
            Return msBlocked_LoginName
        End Get
        Set(ByVal value As String)
            msBlocked_LoginName = value
        End Set
    End Property

    Public Property Blocking_SPID() As Long
        Get
            Return mlBlocking_SPID
        End Get
        Set(ByVal value As Long)
            mlBlocking_SPID = value
        End Set
    End Property

    Public Property Blocking_Status() As String
        Get
            Return msBlocking_Status
        End Get
        Set(ByVal value As String)
            msBlocking_Status = value
        End Set
    End Property

    Public Property Blocking_HostName() As String
        Get
            Return msBlocking_HostName
        End Get
        Set(ByVal value As String)
            msBlocking_HostName = value
        End Set
    End Property

    Public Property Blocking_Program_Name() As String
        Get
            Return msBlocking_Program_Name
        End Get
        Set(ByVal value As String)
            msBlocking_Program_Name = value
        End Set
    End Property

    Public Property Blocking_Command() As String
        Get
            Return msBlocking_Command
        End Get
        Set(ByVal value As String)
            msBlocking_Command = value
        End Set
    End Property

    Public Property Blocking_LoginName() As String
        Get
            Return msBlocking_LoginName
        End Get
        Set(ByVal value As String)
            msBlocking_LoginName = value
        End Set
    End Property
#End Region

#Region "Data"
    Public Sub Load()
        Dim oObject As New DBBlockLog

        oObject.Load(Me)
    End Sub

    Public Sub Save()
        Dim oObject As New DBBlockLog

        Dim oNextID As New DBNextIDValue("DBBlockLog")
        Dim lNextID As Long = oNextID.NextValue

        Me.ID = lNextID

        Me.CreateDate = Now
        oObject.Add(Me)
    End Sub

    Public Sub Delete()
        Dim oObject As New DBBlockLog

        oObject.Delete(Me)
    End Sub
#End Region
End Class
